//
//  ViewController.m
//  WidgetDemo
//
//  Created by 航汇聚科技 on 2017/12/21.
//  Copyright © 2017年 Yi Zhou. All rights reserved.
//

#import "ViewController.h"
#import "AdView.h"
#import "AdViewController.h"

@interface ViewController ()

@property (nonatomic, strong) AdView *launchView;

@property (nonatomic, strong) AdViewController *adViewController;

@end

@implementation ViewController

- (UIStatusBarStyle)preferredStatusBarStyle {
    return UIStatusBarStyleLightContent;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    [self configLaunchImage];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - private
- (void)configLaunchImage {
    
//    self.launchView = [[[NSBundle mainBundle] loadNibNamed:@"AdView" owner:nil options:nil] lastObject];
//    self.launchView.frame = self.view.frame;
//    [self.view addSubview:self.launchView];
    
    self.adViewController = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"AdViewController"];
    [self addChildViewController:self.adViewController];
     [self.view addSubview:self.adViewController.view];
    
   
}
@end
